<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Linux</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="../static/js/jquery-3.4.1.min.js"></script>
    <script src="../static/layui/layui.js"></script>
    <link rel="stylesheet" href="../static/layui/css/layui.css" tppabs="http://res.layui.com/layui/dist/css/layui.css"
          media="all">
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>

<blockquote class="layui-elem-quote layui-text">
    Linux日志
</blockquote>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>Linux日志</legend>
</fieldset>


<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label" style="width:190px">请输入查询日期（全部请输入ALL或者例如"May"）：</label>
        <div class="layui-input-inline">
            <input class="layui-input" id="query_time">
        </div>
        <button type="button" class="layui-btn layui-btn-normal" id="bottom">立即获取</button>
    </div>
</div>
<div id="content" style="overflow: auto; height: 80%;">l</div>
<table class="" id="test"></table>
</body>
<script>
    let $ = jQuery
    $('#bottom').on('click', function () {
        let query_time = $('#query_time').val()
        if (query_time == '') {
            layer.alert('参数未输入')
            return false
        }
        layui.use('table', function(){
  var table = layui.table;

  table.render({
    elem: '#test'
    ,url: '/log_Linux/' + query_time
    ,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
    ,cols: [[
      {field:'list1',  title: '日期'}
      ,{field:'list2',  title: '数据'}
    ]]
  });
});
    }
)


</script>
</html>